package com.example.administrator.nl.activity.order;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;

import com.example.administrator.nl.R;
import com.example.administrator.nl.adapter.MyMakeAdapter;
import com.example.administrator.nl.base.BaseActivity;
import com.example.administrator.nl.base.MyMakeBean;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

// 我的预约
public class MyMakeActivity extends BaseActivity {
    @BindView(R.id.recycler_view)
    RecyclerView recycler_view;
    MyMakeAdapter myMakeAdapter;
    List<MyMakeBean> myMakeBeen;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public void init() {

        recycler_view.setLayoutManager(new LinearLayoutManager(this));
        getData();
        myMakeAdapter = new MyMakeAdapter(R.layout.item_my_make_item, myMakeBeen);
        View headView = LayoutInflater.from(MyMakeActivity.this).inflate(R.layout.head_my_make_layout, null);
        myMakeAdapter.setHeaderView(headView);
        recycler_view.setAdapter(myMakeAdapter);
    }

    @Override
    public int getContentView() {
        return R.layout.activity_my_make;
    }

    public void getData() {
        myMakeBeen= new ArrayList<>();
        myMakeBeen.add(new MyMakeBean());
        myMakeBeen.add(new MyMakeBean());
        myMakeBeen.add(new MyMakeBean());
        myMakeBeen.add(new MyMakeBean());
        myMakeBeen.add(new MyMakeBean());
        myMakeBeen.add(new MyMakeBean());
        myMakeBeen.add(new MyMakeBean());
        myMakeBeen.add(new MyMakeBean());
    }
}
